var express = require('express');
var router = express.Router();

/*
 * @Author: 岸舟
 * @Date: 2020-09-18 17:55:04
 * @LastEditors: MiNine
 * @LastEditTime: 2020-09-24 11:39:36
 * @Description: 定义二级路径及接口名
 */

// const { login, addUser,delUser,modUser,getUsers,getClients,modOrderStatus } = require('../controllers/adminCon');
const {
  addUser,
  login,
  delUser,
  modUser,
  getUsers,
  getClients,
  modOrderStatus,
  uploadUserAvatar
} = require('../controllers/adminCon');

const {
  permission19,
  permission159
} = require('../utils/permissionVerify');

router.post('/login', login);
router.post('/addUser', permission19, addUser);
router.post('/delUser', permission19, delUser);
router.post('/modUser', permission19, modUser);
router.post('/getUsers', permission19, getUsers);
router.post('/getClients', permission159, getClients);
router.post('/modOrderStatus', permission19, modOrderStatus);
router.post("/uploadUserAvatar", permission19, uploadUserAvatar)

module.exports = router;